// Decompiled by Jad v1.5.8e2. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://kpdus.tripod.com/jad.html
// Decompiler options: packimports(3) fieldsfirst ansi space 

package com.teamcenter.rac.form.gdt.text;

import javax.swing.ActionMap;
import javax.swing.JTextArea;

// Referenced classes of package com.teamcenter.rac.form.gdt.text:
//			GdtDocument, GdtTextEditorUI, GdtTokenMarker, GdtEditorKit

public class GdtTextEditor extends JTextArea
{

	public GdtTextEditor()
	{
		super(new GdtDocument(), "", 5, 30);
		setUI(new GdtTextEditorUI());
		hackActionMap(getActionMap(), getActionMap());
		new GdtTokenMarker(this);
	}

	public GdtDocument getGdtDocument()
	{
		return (GdtDocument)getDocument();
	}

	protected void hackActionMap(ActionMap actionmap, ActionMap actionmap1)
	{
		if (actionmap == null)
			return;
		Object aobj[] = actionmap.keys();
		if (aobj != null)
		{
			for (int i = 0; i < aobj.length; i++)
			{
				javax.swing.Action action = actionmap.get(aobj[i]);
				javax.swing.Action action1 = GdtEditorKit.hackAction(action);
				if (action1 != action)
					actionmap1.put(aobj[i], action1);
			}

		}
		hackActionMap(actionmap.getParent(), actionmap1);
	}
}
